@extends('admin.layout')

@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section>
            {{--<h1>--}}
                {{--批量订单导入--}}
            {{--</h1>--}}
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li class="active">订单导入</li>
            </ol>
        </section>
        <span id="msg" style="display: none">
            @if (count($errors) > 0)
                @foreach ($errors->all() as $error)
                    <div style="width: 100%;">
                        <span style="color: red;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ $error }}</span>
                    </div>
                @endforeach
            @else
                <div style="width: 100%;">
                    <span style="color: green;display: block;margin: 0px auto;width: 200px;text-align: center;">{{ Session::get('msg') }}</span>
                </div>
            @endif
        </span>
        <script type="text/javascript">
            var _msg = $('#msg div span').text();
//            console.log(_msg);
            if(_msg != ''){
                layer.msg(_msg);
            }
        </script>
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12" style="width: 100%;">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"></h3>
                        </div>
                        <form action="{{ url('admin/orders/import') }}" method="post" enctype="multipart/form-data">
                            {{ csrf_field() }}
                            <div class="box-body" style="width: 50%;">
                                <div class="form-group">
                                    <label for="exampleInputName">批量订单导入:</label>
                                    <input type="file" name="file" value="" class="form-control" id="exampleInputName" >
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputName">管理员手机号:</label>
                                    <input type="text" name="phone" placeholder="手机号码" class="form-control" value="{{ end($lastPhone) }}" required="required" maxlength="11">
                                </div>
                            </div>
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </section>
    </div>
@stop